INCLUDES:=./
SRCS:=$(wildcard *.cc)
CXXFLAGS:= -g
LIBS:= -lwfrest -lsrpc -lprotobuf -lworkflow  -lssl -lcrypto -lcrypt -lSimpleAmqpClient
ALIBABALIBS:= -fno-rtti -lalibabacloud-oss-cpp-sdk -lcurl -lpthread
OBJS:=$(patsubst %.cc, %.o, $(SRCS))
SERVER:=wfrest_server

$(SERVER): main.o hash.o token.o user.pb.o
	g++ $^ -o $@ $(CXXFLAGS)  $(LIBS)   $(addprefix -I, $(INCLUDES))

testHash: hash.o testHash.o token.o
	g++ $^ -o $@ $(CXXFLAGS) $(LIBS)

testConsumer: mqconsumer.cc oss.cc
	g++ $^ -o $@ $(CXXFLAGS) $(ALIBABALIBS) $(LIBS)   

%.o:%.cc
	g++ -c $^ -o $@ $(CXXFLAGS) $(LIBS)  $(addprefix -I, $(INCLUDES))

clean:
	rm -rf $(OBJS) $(SERVER) testHash testConsumer
